﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Sirius.Data
{
    public static class ApiPackManager
    {
        public static string create_setChannelInfoPack(string? name, int? position, string? parent_id, int? private_type, int? speak_permission)
        {
            return JsonSerializer.Serialize(new setChannelInfoPack(name,position,parent_id,private_type,speak_permission));
        }

        public static string Create_setGuildRolePack(string? name,int? color,int? hoist)
        {
            return JsonSerializer.Serialize(new setGuildRole(name, color, hoist));
        }

        public static string Create_createChannelPack(string? name, int? type, int? sub_type, int position, string? parent_id, int? private_id, string[]? private_user_ids, int? speak_permission, string? application_id)
        {
            return JsonSerializer.Serialize(new createChannel( name, type, sub_type, position, parent_id, private_id, private_user_ids, speak_permission, application_id));
        }
        public static string Create_noSpeakPack(string? mute_end_timestamp,string? mute_seconds)
        {
            return JsonSerializer.Serialize(new noSpeak(mute_end_timestamp, mute_seconds));
        }
        public static string Create_createSchedulesPack(string name, string? description, string start_timestamp, string end_timestamp, string jump_channel_id, string? remind_type)
        {
            return JsonSerializer.Serialize(new createSchedules(name, description, start_timestamp, end_timestamp, jump_channel_id, remind_type));
        }
    }

    public class setChannelInfoPack
    {
        public setChannelInfoPack(string? name,int? position,string? parent_id,int? private_type,int? speak_permission)
        {
            this.Name = name;
            this.Position = position;
            this.parent_id = parent_id;
            this.private_type = private_type;
            this.speak_permission = speak_permission;
        }

        [JsonPropertyName("name")]
        public string? Name { get; set; }

        [JsonPropertyName("position")]
        public int? Position { get; set; }
        [JsonPropertyName("parent_id")]
        public string? parent_id { get; set; }

        [JsonPropertyName("private_type")]
        public int? private_type { get; set; }

        [JsonPropertyName("speak_permission")]
        public int? speak_permission { get; set; }
    }

    public class setGuildRole
    {
        public setGuildRole(string? name,int? color,int? hoist)
        {
            this.name = name;
            this.color = color;
            this.hoist = hoist;
        }
        [JsonPropertyName("name")]
        public string? name { get; set; }

        [JsonPropertyName("color")]
        public int? color { get; set; }

        [JsonPropertyName("hoist")]
        public int? hoist { get; set; }
    }

    public class createChannel
    {
        public createChannel(string? name,int? type,int? sub_type,int position,string? parent_id,int? private_id,string[]? private_user_ids,int? speak_permission,string? application_id)
        {
            this.guild_id = guild_id;
            this.name = name;
            this.type= type;
            this.sub_type = sub_type;
            this.position = position;
            this.parent_id = parent_id;
            this.private_id = private_id;
            this.private_user_ids = private_user_ids;
            this.speak_permission = speak_permission;
            this.application_id = application_id;
        }

        [JsonPropertyName("guild_id")]
        public string guild_id { get; set; }


        [JsonPropertyName("name")]
        public string? name { get; set; }

        [JsonPropertyName("type")]
        public int? type { get; set; }

        [JsonPropertyName("sub_type")]
        public int? sub_type { get; set; }
        
        [JsonPropertyName("position")]
        public int position { get; set; }

        [JsonPropertyName("parent_id")]
        public string? parent_id { get; set; }
        
        [JsonPropertyName("private_type")]
        public int? private_id { get; set; }

        [JsonPropertyName("private_user_ids")]
        public string[]? private_user_ids { get; set; }

        [JsonPropertyName("speak_permission")]
        public int? speak_permission { get; set; }

        [JsonPropertyName("application_id")]
        public string? application_id { get; set; }
    }

    public class noSpeak
    {
        public noSpeak(string? mute_end_timestamp,string? mute_seconds)
        {
            this.mute_end_timestamp = mute_end_timestamp;
            this.mute_seconds= mute_seconds; 
        }


        [JsonPropertyName("mute_end_timestamp")]
        public string? mute_end_timestamp { get; set; }

        [JsonPropertyName("mute_seconds")]
        public string? mute_seconds { get; set; }
    }

    public class createSchedules
    {
        public createSchedules(string name,string? description,string startTimestamp,string endTimestamp,string? jumpChannel_Id,string? remind_type)
        {
            this.name = name;
            this.description= description;
            this.startTimestamp = startTimestamp;
            this.endTimestamp = endTimestamp;
            this.jumpChannel_Id = jumpChannel_Id;
            this.remind_type = remind_type;

        }

        [JsonPropertyName("name")]
        public string name { get; set; }
        
        [JsonPropertyName("description")]
        public string? description { get; set; }

        [JsonPropertyName("start_timestamp")]
        public string startTimestamp { get; set; }

        [JsonPropertyName("end_timestamp")]
        public string endTimestamp { get; set; }

        [JsonPropertyName("jump_channel_id")]
        public string? jumpChannel_Id { get; set; }

        [JsonPropertyName("remind_type")]
        public string remind_type { get; set; }
    }

    public class editSchedules
    {


    }

}
